package com.itheima.tliassystem.mapper;


import entity.Emp;
import entity.EmpQuery;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmpMapper {
//    @Select("select count(*) from emp")
//    Long count();

//    @Select("select * from emp  limit #{page},#{pageSize}")
//    List<Emp> pageEmp(EmpQuery empQuery);
//    @Select("select * from emp ")
    List<Emp> pageEmp(EmpQuery empQuery);

    void deleteById(@Param("ids")List<Integer> ids);

    void add(Emp emp);

    Emp selectById(Integer id);

    void upDate(Emp emp);
@Select("select * from emp where username = #{username}")
    Emp checkLongin(String username);
@Delete("delete from emp where dept_id = #{deptId} ;")
    void deleteById1(Integer id);
}
